# -*- coding: utf-8 -*-
# @Time: 2021/8/9 8:52
# @File: problem-17.py
# @DESC:
from typing import List


class Solution:
    def letterCombinations(self, digits: str) -> List[str]:
        if not digits: return []
        phone = ['abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz']
        queue = ['']  # 初始化队列
        for digit in digits:
            for _ in range(len(queue)):
                tmp = queue.pop(0)
                for letter in phone[ord(digit) - 50]:
                    queue.append(tmp + letter)
        return queue


s = Solution()

r = s.letterCombinations("1")

print(r)

print(ord("2"))
